package org.window;


import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebView;
import javafx.stage.Stage;



public class App extends Application {
    @Override
    public void start(Stage stage) throws Exception {
        WebView webView = new WebView();

        webView.getEngine().load("http://localhost:5173/");

        // 创建一个 JavaFX 窗口
        VBox root = new VBox(webView);
        Scene scene = new Scene(root, 1080, 600);

        stage.setTitle("Java WebView 示例");
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
